<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta charset="utf-8">
<title>写新日志</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1">
<link href="css/boilerplate.css" rel="stylesheet" type="text/css">
<link href="css/base.css" rel="stylesheet" type="text/css">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="">
<link rel="apple-touch-icon-precomposed" href="">
<link rel="shortcut icon" href="">
	<script src="js/jquery-1.2.6.js"></script>
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<script type="text/javascript" src="js/selectivizr-min.js"></script>
<![endif]-->
<!--[if lt IE 7]>
<script src="js/minmax.js"></script>
<![endif]-->
<script type="text/javascript" src="js/picobox.js"></script>
<script type="text/javascript" src="js/picobox_beauty.js"></script>
<link rel="stylesheet" href="css/picobox.css" type="text/css"  />
<link rel="stylesheet" href="css/picobox_beauty.css" type="text/css"  />
<script language="javascript">
function doCheck(ischecked) {
	$('input.mch').each(function(i){
		this.checked = ischecked;
	});
}
function getChecked() {
	var ids = '';
	$('input.mch').each(function(i){
		if (this.checked) {
			ids += this.value + ',';
		}
	});
	if (ids != '') {
		ids = ids.substr(0, ids.length-1);
	}
	return ids;
}
function confirmDel() {
	var ids = getChecked();
	if (ids.length == '') {
		alert('请选择要删除的记录。');
		return false;
	}
	if (!confirm('真的要删除选中的记录吗？')) {
		return false;
	}
	return true;
}
function welcomeText(username) {
	  var time = ['子时', '丑时', '寅时', '卯时', '辰时', '巳时', '午时', '未时', '申时', '酉时', '戌时', '亥时'];
	  var text = ['夜半销魂，谁人歌', '雄鸡未鸣，身未起', '风雨如晦，平旦出', '旭日东升，无往复', '君子勿劳，朝食饱', '鸡栖于莳，河清定', '善行无迹，恒德足', '日过中天，骄未散 ', '哺鹊进食，斜阳归', '鸡栖于埘，日沉坡', '日暮将至，归田园', '人定归本，早安眠'];
	  var arr_week = ['', '星期一','星期二','星期三','星期四','星期五','星期六','星期日'];
	  hour = new Date().getHours();
	  year = new Date().getFullYear();
	  month = new Date().getMonth();
	  dayx = new Date().getDate();
	  monthx = month+1;
	  week = arr_week[new Date().getDay()];
	  
	  hourx = Math.ceil(hour/2);
	  if (hourx == 12) { hourx = 0; }
	  var today = year+"年"+monthx+"月"+dayx+"日 "+week;
	  second = new Date().getSeconds();
	  if(second % 2 == 0){
	   welcome = "<span class=\"greeting\" title=\""+today+"\"><strong></strong>&nbsp;&nbsp;</span>";
	  }
	  else{
	   welcome = "<span class=\"greeting\" title=\""+today+"\"><strong>" + time[hourx] +  "</strong>&nbsp;&nbsp;" + text[hourx] + "</span>";
	  }
	  return welcome;
	}
</script>
</head>
<body>
        		<div class="header">
  			<div class="header-inner">
    			<div class="user-info">
      				<div class="user-avatar">
      					<span class="pie" title="">
      						<a href="http://home.blogbus.com/edit/">
      							<img src="images/avatar_12855046_96.jpg" alt="" class="pie">
      						</a>
      					</span>
      				</div>
      				<h2 class="user-name">blogbus_KyeB0474 &nbsp;<a href='#' style='color:#666'>退出</a></h2>
      				<p id="prompt-msg"><script type="text/javascript">document.write(welcomeText("blogbus_KyeB0474"))</script></p>
    			</div>
    			<div class="utilities">
      				<ul>
       					<li class="dashboard"><a href="#"><span class="pie icon"><span class="pie indicator" id="msgcount">0</span></span>管理中心</a></li>
        				<li class="new-entry"><a href="#"><span class="pie icon"></span>新日志</a></li>
        				<li class="blog-list"><a href="#"><span class="pie icon"></span>博客</a></li>
        				<li class="album-list"><a href="#"><span class="pie icon"></span>相册</a></li>
        				<li class="friend-list"><a href="#"><span class="pie icon"></span>好友</a></li>
        				<li class="events"><a href="#"><span class="pie icon"></span>活动</a></li>
        				<li class="vip"><a href="#"><span class="pie icon"></span>VIP</a></li>
        				<li class="home"><a href="/"><span class="pie icon"></span>首页</a></li>
      				</ul>
    			</div>
  			</div>			
		</div>
<script type="text/javascript">
(function (){
$('#allSubMenus').css('display','none');
var _menuEff={};
_menuEff.cur=null;
function switchMenu(id) {
var menu_html = (_menuEff.cur.hasClass('menuBlogClass') && id=='menuBlog' && menu) ? menu : $('#allSubMenus #'+id).html();
$('#appSubMenuBlock').html(menu_html).css('paddingLeft', $('#allSubMenus #'+id).css('paddingLeft'));
}
$('ul.menus li').hover(function(e){
        _menuEff.cur=_menuEff.cur||$('ul.menus li.actived');
        $('ul.menus li').removeClass('actived');
        var id = 'menu'+this.className.match(/menu(\w+)Class/)[1];
        switchMenu(id);
        $(this).addClass('actived');
},
function(e){
        if (e.relatedTarget.tagName!='DIV') {
                return;
        }
        if (_menuEff.cur && !$(e.relatedTarget).hasClass('subMenus')) {
                $('ul.menus li').removeClass('actived');
                _menuEff.cur.addClass('actived');
                var id = _menuEff.cur[0].className.match(/(menu\w+)Class/)[1];
                switchMenu(id);
        }
});
$('div.mainNavi').mouseout(function(e){
        if (_menuEff.cur && e.relatedTarget.id=='wrapper') {
                $('ul.menus li').removeClass('actived');
                _menuEff.cur.addClass('actived');
                var id = _menuEff.cur[0].className.match(/(menu\w+)Class/)[1];
                switchMenu(id);
        }
});
})();
//$('#header').append('<div class="new"></div>');
</script>
   
	<!--main start-->
		<style>

	<!--

		.utilities ul li.new-entry:before {

		    z-index: 1;

		    content:'';

		    position: absolute;

		    left:40%;

		    top:84%;

		    width: 0px;

		    height: 0px;

		    border-style:solid; 

		    border-width:7px;

		    border-color: transparent transparent #90c044 transparent;

		}   /*...伪元素实现三角...*/

		

		.utilities ul li.new-entry a { color:#90c044; }

		.utilities ul li.new-entry a .icon { background-color:#90c044; }

	-->

	</style>

	<link href="css/blog.css" rel="stylesheet" type="text/css">

    <div class="nav">

        <div class="container">

            <ul>

                <li class="xinrizhi"><a href="#" class="pie">写新日志</a></li>

                <li class="rizhi"><a href="#" class="pie">日志</a></li>

                <li class="moban"><a href="#" class="pie">模板</a></li>

                <li class="pinlun"><a href="#" class="pie">评论</a></li>

                <li class="yinyong"><a href="#" class="pie">引用</a></li>

                <li class="fenglei"><a href="#" class="pie">分类</a></li>

                <li class="biaoqian"><a href="#" class="pie">标签</a></li>

                <li class="lianjie"><a href="#" class="pie">友情链接</a></li>

                <li class="shezhi"><a href="#" class="pie">博客设置</a></li>

                <li class="tongji"><a href="#" class="pie">访问统计</a></li>

                <li class="quanbu"><a href="#" class="pie">全部博客</a></li>

            </ul>

        </div>

    </div>

<script type="text/javascript">
$('a.submenuNewPost').addClass('actived');
</script>
<script type="text/javascript" src="js/tiny_mce.js"></script>
<script type="text/javascript">
document.domain='blogbus.com';
tinyMCE.init({
    theme : "advanced",
    mode : "exact",
    language : 'zh-cn',
    elements : "content,excerpt",
    convert_urls : false,
    width:870,
    content_css : "http://q.blogbus.com/bbc-v6/css/editor_content.css",
    plugins : "media,inlinepopups",
    inlinepopups_skin : "blogbus",
    theme_advanced_buttons1 : 'fontselect,fontsizeselect,forecolor,backcolor,bold,italic,underline ,strikethrough,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,link,unlink,image,flash,media,|,copy,cut,paste,removeformat,undo,redo,code',
    theme_advanced_buttons2 : '',
    theme_advanced_buttons3 : '',
    theme_advanced_fonts : "宋体=\'宋体\', sans-serif; 黑体=\'黑体\', sans-serif; 楷体=\'楷体_GB2312\', sans-serif; 隶书=\'隶书\', sans-serif;幼圆=\'幼圆\', sans-serif; 新宋体=\'新宋体\',sans-serif;微软雅黑=\'微软雅黑\', sans-serif; Arial=Arial; Arial Black=Arial Black; Arial Narrow=Arial Narrow; Brush Script MT=Brush Script MT; Century Gothic=Century Gothic; Comic Sans MS=Comic Sans MS; Courier=Courier; Courier New=Courier New; MS Sans Serif=MS Sans Serif; Script=Script; System=System; Times New Roman=Times New Roman; Verdana=Verdana; Wide Latin=Wide Latin; Wingdings=Wingdings;",
    theme_advanced_font_sizes : "9px=9px,10px=10px,12px=12px,14px=14px,16px=16px,18px=18px,24px=24px,36px=36px",
    extended_valid_elements : "code[name|class],pre[name|class|style],fieldset[class|dir<ltr?rtl|id|lang|style|title],"
        +"textarea[accesskey|class|cols|disabled<disabled|id|lang|name|readonly<readonly|rows|style|tabindex|title],"
        +"input[accept|accesskey|align<bottom?left?middle?right?top|alt|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang|maxlength"
        +"|name|readonly<readonly|size|src|style|tabindex|title|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text|usemap|value],"
        +"option[class|dir<ltr?rtl|disabled<disabled|id|label|lang|selected<selected|style|title|value],"
        +"button[accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|style|tabindex|title|type|value],"
        +"select[class|dir<ltr?rtl|disabled<disabled|id|lang|multiple<multiple|name|size|style|tabindex|title],"
        +"form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang|method<get?post|name|style|title|target]",
    remove_linebreaks : false,
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_path_location : "bottom",
    theme_advanced_resizing : true,
    theme_advanced_resize_horizontal : false
});
</script>
<!-- /editor -->
<script type="text/javascript">
var _blog_id = 7234306;
var _post_id = 0;
var _editor_status = false;
function insertHtml(str) {
    tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, str);
}
function insertObj(src, basepath, thumb) {
    var type = src.substring(src.length - 3, src.length).toLowerCase();
    switch( type ) {
    case "bmp":
    case "png":
    case "gif":
    case "jpg":
        objstr = getImageObj(src, basepath, 0, 0, thumb);
        break;
    case "swf":
        objstr = getMediaObj(basepath + src, 400, 360);
        break;
    case "mp3":
    case "mpg":
    case "wmv":
    case "wma":
    case "asf":
        objstr = getMediaObj(basepath + src, 300, 200, 'WindowsMedia');
        break;
    default :
        objstr = '<a href="' + basepath + src + '" target="_blank">' + basepath + src + '</a>';
    }
	insertHtml(objstr);
}
function onMessage(msg){
alert(msg);
}
function getMediaObj(src, width, height, type) {
    if (!type) {
        type = 'Flash';
    }
    return html = ''
        + '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" '
        + ' width="' + width + '"'
        + ' height="' + height + '"'
        + ' border="0" title="src:\'' + src + '\',width:\'' + width + '\',height:\'' + height + '\'" class="mceItem' + type + '" />';
}
function getImageObj(src, basepath, width, height, thumb) {
    width = width ? ' width="' + width + '"' : '';
    height = height ? ' height="' + height + '"' : "";
    var html = '<img src="' + basepath + src + '" '
        + width + height
        + ' border="0"/>';
    if (thumb == 2){
        html = '<a href="' + basepath + 's/' + src  + '" target="_blank">' + html + '</a>';
    }
    return html;
}
</script>
<style type="text/css">
.nav ul li.xinrizhi a { 
	background:#fff; 
	color:#90c044; 
	-webkit-border-radius:5px 5px 0 0; 
	-moz-border-radius:5px 5px 0 0; 
	border-radius:5px 5px 0 0; 
}
.container{overflow:visible}
</style>
<div class="container">
	<div class="content">
    <!--title start-->
    <div class="current-blog">
        		<!-- 当前博客：<a href="javascript:void(0)" target="_blank">Bus公告</a> <span class="switch-blogs"><a href="javascript:void(0)">[切换博客]</a></span> -->
        		<span class="subCurrent">
	<div style='float:left'>
	当前博客：<a title="在新窗口中查看：蒂法 (http://queentifa.blogbus.com" class="pub_blogName01" target="_blank" href="http://queentifa.blogbus.com">蒂法</a>
	</div>
	<div style='float:left;margin-left:10px'>
		<a id="switch_blog" onclick="toggleMenu('#dm_changeBlog')" title="切换当前博客" class="pub_subLink" href="javascript:void(0)">[切换博客]</a>
		<ul style="display: none;" class="pub_dropmenu change_blog" id="dm_changeBlog">
			
			<li><a onclick="hideMenu('#dm_changeBlog');return false;" href="/7234306/posts/form">
				蒂法</a></li>
			
		</ul>
	</div>
	<script type="text/javascript">
	function toggleMenu(selector){
		$(selector).slideToggle('fast');
	}
	</script>
</span>
        </div>
    <!--title end-->
    <!--main start-->
	<form method="post" action="/7234306/posts/" name="EditorForm">
    <div id="pub_main" class='new_post'>
      <!--<div class="noticeInfo" style="margin-left:0; margin-right:0; margin-bottom:15px;">
<p>“文件管理”功能升级，“添加图片”功能暂时不可用。预计周三（5月20日）上午九点恢复，给您带来的不便，敬请谅解！</p>
      </div>-->
      <div id="postWrite">
        <div class="postWrite_r1">
          <div class="postWrite_title">
            <label>标题：</label>
            <input name="title" id='post_title' type="text" style="width:410px;" class="text" value=""/>
          </div>
          <div class="postWrite_time">
            <label>时间：</label>
			<input type="hidden" id="post_time" name="post_time" value="2017-06-15 17:50" />
            <span class="postWrite_currentDate"></span>&nbsp;<span class="postWrite_currentTime"></span>
			<span class="postWrite_time_edit pub_dropmenuP"><a href="javascript:void(0)" onclick="$('#dm_postWrite_time_edit').slideToggle('fast');return false;"><img class="pub_subLink" src="images/icon_pencil_s.gif" width="16" height="16" alt="修改" /></a>
	            <div id="dm_postWrite_time_edit" class="dm_postWrite_time_edit pub_dropmenu" style="display:none;">
	              <p class="info">修改日志发布时间</p>
	              <p>
	                <input type="text" style="width:75px;" class="text" id="txtDate" />
	                <input type="text" style="width:45px;margin-top:5px" class="text" id="txtTime" />
	              </p>
	              <div>
	                <input type="button" value="确定" id="postDateOk" class="button" />
	                <input type="button" value="取消" id="postDateCancel" class="button" />
	              </div>
	            </div>
					</span>
             </div>
          <div class="clearfix"></div>
        </div>
        <div class="postWrite_r2 cb">
          <div class="postWrite_content bgGray">
            <div class="inserButton"> <img id="btn_smily" height="30" width="85" alt="插入表情" src="images/buttons1.gif"/> <img height="30" width="85" alt="插入图片" src="images/buttons2.gif" id="btn_pic" /> <img height="30" width="85" alt="插入书籍" src="images/douban_button.png" id="btn_douban" /><span class="draftSave"></span> </div>
            <div class="postWrite_content_">
              <textarea  name="content" id="content" style="width:870px; height:300px; margin-left:2px;"></textarea>
            </div>
          </div>
        </div>
        <div class="postWrite_r3 cb">
          <div class="postWrite_cate">
            <label>分类：</label>
            <select name="sort_id">
        <option value="">选择分类...</option>
            <option value="4451580">心情</option>
    </select>            <span class="postWrite_cate_add"> <a href="javascript:void(0)" id="newCate">创建分类</a></span> </div>
          <div class="postWrite_tag pub_dropmenuP">
            <label>标签：</label>
            <input name="tags" type="text" style="width:300px;" class="text pub_subLink"
	   value="" />
	    <input type="button" class="button" value="自动提取标签" id="btn_extract" />
	   
	   
            
            <div id="dm_postWrite_tag" class="pub_dropmenu">
              
            </div>
          <div class="clearfix"></div>
        </div>
		
        <div id="postWrite_advanced" class="bgGray cb">
          <div class="postWrite_advanced_title">
            <label>高级选项</label>
          </div>
          <div class="postWrite_advanced_content" style='display:none'>
            <div class="postWrite_r4">
              <div class="postWrite_excerpt">
                <div class="postWrite_excerpt_title">
                  <label>文章摘要：</label>
                  不填时则自动生成，或 <a href="javascript:void(0)" id="ln_copy_content">复制全文内容到简介</a></div>
                <div class="postWrite_excerpt_edit">
                  <textarea style="width:870px; height:200px;" id="excerpt" name="excerpt"  class="editor"></textarea>
                </div>
              </div>
            </div>
            <div class="postWrite_r5">
              <div class="postWrite_private">
                <label>阅读权限：</label>
                <span class="postWrite_pri_statu">公开</span> <span class="postWrite_pri_edit pub_dropmenuP"><a href="javascript:void(0)" onclick="$('#dm_postWrite_pri_edit').slideToggle('fast'); return false;"><img src="images/icon_pencil_s.gif" width="16" height="16" alt="修改" class="pub_subLink"/></a>
                <div id="dm_postWrite_pri_edit" class="pub_dropmenu">
                  <p class="info">修改阅读权限</p>
                  <ul>
                    <li>
                      <input type="radio" name="visibility" value="public" id="visi_pub" checked="checked" />
                      <label for="visi_pub">公开</label>
                    </li>
                    <li>
                      <input type="radio" name="visibility" value="hidden" id="visi_hid" />
                      <label for="visi_hid">隐藏</label>
                    </li>
                    <li>
                      <input type="radio" name="visibility" value="password" id="visi_pwd" />
                      <label for="visi_pwd">密码</label>
                      <input type="text" style="width:55px;" class="text" name="password" value="" />
                    </li>
                  </ul>
                  <div>
					<input name="visi_opt" value="public" type="hidden" />                    <input type="button" value="确定" class="button" id="visi_ok"/>
                    <input type="button" value="取消" class="button" id="visi_cancel"/>
                  </div>
                </div>
                </span> </div>
              <div class="postWrite_option">
                <input type="checkbox" value="1" name="always_top" id="chk_always_top">
                <label for="chk_always_top">日志置顶</label>
		 <input type="checkbox" value="1" name="allow_recommend" id="chk_allow_recommend">
                <label for="chk_allow_recommend">推荐到首页</label>
                <input type="checkbox" value="1" name="allow_comment" id="chk_allow_comment">
                <label for="chk_allow_comment">允许评论</label>
                <input type="checkbox" value="1" id="chk_allow_trackback" name="allow_trackback">
                <label for="chk_allow_trackback">允许引用</label>
                <input type="checkbox" value="1" name="allow_auto_link" id="chk_allow_auto_link">
                <label for="chk_allow_auto_link">允许自动链接</label>
              </div>
              <div class="clearfix"></div>
            </div>
          </div>
        </div>
        <div class="postWrite_r6">
          <div class=" wmp_button">
						<input name="force" value="0" type="hidden" />            <input type="button" value="发布日志" id="btn_pub" class='button' style='float:left'>
            <input type="button" value="保存草稿" id="btn_draft" class='button' style='float:left'>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>
	</form>
    <!--main end-->
	</div>
</div>
  
<div id="addNewCat" style="display:none">
<table border="0" cellpadding="0" cellspacing="0" class="popup_edit" >
  <tr>
    <th class="height30">新分类名称：</th>
    <td><input name="name" type="text" style="width:200px;" id="new_sort_name" /></td>
  </tr>
  <tr>
    <td colspan="2"><div  class="buttoncenter">
<input type="button"  class="button" value="添加分类" onclick="addSort($('#picobox #new_sort_name').val());Picobox.hide()" /><input type="button" onclick="Picobox.hide()"  class="button" value="取消" />
</div></td>
  </tr>
</table>
</div>
  
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript">
$('#btn_smily').click(function(){
	Picobox.showIFrameBox('插入表情','http://user.blogbus.com/user/view/emotions.html?from=blog.home.blogbus.com', {height:300,width:375});
	return false;
}).css('cursor','pointer');
$('#btn_pic').click(function(){
	Picobox.showIFrameBox('插入图片','http://user.blogbus.com/user/?mm=File&aa=Browser&from=blog.home.blogbus.com',{height:490,width:730});return false;
	return false;
}).css('cursor','pointer');
$('#btn_douban').click(function(){
	Picobox.showIFrameBox('插入书籍','http://user.blogbus.com/user/?mm=Douban&aa=Browser&from=blog.home.blogbus.com',{height:460,width:700});
	return false;
}).css('cursor','pointer');
function addSort(sortname) {
    if (sortname!=null && sortname=='') {
        return;
    }
    $.post("http://blog.home.blogbus.com/7234306/categories?json=1", {"name": sortname},
		function (json) {
			if (json.success) {
				var id = json.success.id;
				$('select[name=sort_id]').append(new Option(sortname, id)).val(id);
			}
		}, 'json'
	);
}  
function updatePostDate() {
	var arr_datetime = $('#post_time').val().split(/[ ]+/);
	$('#txtDate').val(arr_datetime[0]);
	$('#txtTime').val(arr_datetime[1]);
	$('span.postWrite_currentDate').text(arr_datetime[0]);
	$('span.postWrite_currentTime').text(arr_datetime[1]);
}
updatePostDate();
$('#postDateOk').click(function(){
	var datetime = $.trim($('#txtDate').val()+' '+$('#txtTime').val());
	$('#post_time').val(datetime);
	updatePostDate();
	$('#dm_postWrite_time_edit').slideUp('fast');
});
$('#postDateCancel').click(function(){
	$('#dm_postWrite_time_edit').slideUp('fast');
	updatePostDate();
});  
var edit_form = document.EditorForm;
var visi_names = {'public':'公开','hidden':'隐藏','password':'加密'}
$('#visi_ok').click(function () {
	var value = $(edit_form).find('.postWrite_private input:radio:checked').val();
	edit_form.visi_opt.value = value;
	$(edit_form).find('span.postWrite_pri_statu').text(visi_names[value]);
	if (value == 'hidden') {
		$('#chk_always_top').attr('checked', false).attr('disabled', true);
	} else {
		$('#chk_always_top').attr('disabled', false);
	}
	$('#dm_postWrite_pri_edit').slideUp('fast');
});
$('#visi_cancel').click(function () {
	var value = edit_form.visi_opt.value;
	$('#dm_postWrite_pri_edit').slideUp('fast');
	$(edit_form).find('.postWrite_private input:radio').each(function(){
	if (this.value==value){
		this.checked=true;
	}
	});
	if (value == 'hidden') {
		$('#chk_always_top').attr('checked', false).attr('disabled', true);
	} else {
		$('#chk_always_top').attr('disabled', false);
	}
	$(edit_form).find('span.postWrite_pri_statu').text(visi_names[value]);
});
$('#visi_cancel').click();
$('select[name=sort_id]').val();
//$('input[name=tags]').click(function(){$('#dm_postWrite_tag').slideDown('fast');return false;});
function hint(input, str) {
	var n_hint = $('<div></div>').css({
		'position': 'absolute',
		'left':input.offsetLeft,
		'top':input.offsetTop,
		'height':input.offsetHeight,
		'width':input.offsetWidth,
		'paddingLeft':'0.5em',
		'color':'#999',
		'zIndex':-1
	}).text(str).click(function(){$(input).focus().click();return false;});
	$(input).parent().css('position', 'relative').append(n_hint);
	var _hint=function(o){
		var v=o.value?o.value:this.value;
		if (v=='' || v==undefined){
			n_hint.css('visibility','visible');
		} else {
			n_hint.css('visibility','hidden');
		}
	};
	$(input).css({'backgroundColor':'transparent','zIndex':1}).focus(function(){n_hint.css('visibility','hidden');}).blur(_hint).change(_hint);
	_hint(input);
}
hint($('input[name=tags]')[0], '最多可以加5个标签，用逗号或空格分隔');
$('#btn_extract').click(function() {
$('#btn_extract').attr('disabled', true);
var data = {
	'title':edit_form.title.value,
	'content':tinyMCE.editors.content.getContent(),
	'REQUEST_METHOD':'GET'
};
var url="/posts/extract_tags";
$.post(url, data, function(ret){
	$('#btn_extract').attr('disabled', false);
	if (!ret.tags) {
		return;
	}
	$('input[name=tags]').val(ret.tags.join(' ')).change();
}, 'json');
});
$('#dm_postWrite_tag').find('span').mousedown(function(){
	var tags = $('.postWrite_tag input:text').val().split(/[\s　]+/g);
	var t = [];
	var new_tag =$(this).text();
	for (var i=0; i<tags.length;i++) {
		if (tags[i]=='') {
			continue;
		}
		if (tags[i]==new_tag) {
			return;
		}
		t.push(tags[i]);
	}
	if (t.length >= 5) {
		alert('最多可以填入5个标签');
		return;
	}
	tags = t;
	tags.push(new_tag);
	$('input[name=tags]').val(tags.join(' ')).change();
});
$('#ln_copy_content').click(function(){
tinyMCE.getInstanceById('excerpt').setContent(tinyMCE.getInstanceById('content').getContent());
return false;
});
$('#chk_allow_comment').attr('checked', true);
$('#chk_allow_trackback').attr('checked', true);
$('#chk_allow_auto_link').attr('checked', true);
//
//if (_draftid != 0 && edit_form.ID.value != 0) {
//	$('#autosavemsg').html('此篇日志已保存在草稿，<a href="javascript: recovery('+ _draftid +')">点击导入</a>');
//}
$('#postWrite_advanced div.postWrite_advanced_title').click(function(){
	$('.postWrite_advanced_content').slideToggle('fast', function(){
	$.cookie('bus.editor.showAdv', $('.postWrite_advanced_content').css('display'), {path:'/',expires:365});
	});
});
$('.postWrite_advanced_content').css('display', $.cookie('bus.editor.showAdv')||'none');
$(edit_form).submit(function(){return false;});
function post() {
if(document.getElementById('post_title').value=='') {alert('您还没有填写标题'); return;}
$('#btn_pub').attr('disabled', true);
$('#btn_pub').removeClass('button');
$('#btn_pub').addClass('button_submit');
$('#btn_pub').val('正在发布');
edit_form.content.value=tinyMCE.editors.content.getContent();
edit_form.excerpt.value=tinyMCE.editors.excerpt.getContent();
var data = $(edit_form).serialize();
$.ajax({
'url':edit_form.action,'data':data,'type':'POST','dataType':'json',
'complete':function(ret){
	 $('#btn_pub').attr('disabled', false);
	$('#btn_pub').removeClass('button_submit');
        $('#btn_pub').addClass('button');
	$('#btn_pub').val('发布日志');
},
'success':function(ret){
	if (ret.success) {
		window.location.href = 'http://blog.home.blogbus.com/'+_blog_id+'/posts';
		return;
	} else if(ret.failure.bad) {
			if (confirm("您提交的日志中存在敏感词汇("+ret.failure.bad_content+")，若您确定发布，该日志将被暂时锁定，审核通过后即可正常显示，请耐心等待。您也可选择“取消”，修改或去除敏感词汇后再提交。\n为了维护博客大巴网络和谐，请避免涉及政治或低俗内容，感谢配合。")) {	
			edit_form.force.value = 1;
			post();
		}
	} else if (ret.failure.message) {
                alert(ret.failure.message);
	}
},
'error':function(xhr, status){
	var ret=(new Function('return '+xhr.responseText))();
	if (ret.failure.message){
		alert(ret.failure.message);
	}
	$('#btn_pub').attr('disabled', false);
}
});
}
$('#btn_pub').click(post);
var draft_id=0;
function draft() {
var content=tinyMCE.editors.content.getContent();
if (content=='' || edit_form.content.value==content) {
	return;
}
if (draft.lock){return;};
draft.lock=true;
$('#btn_draft').attr('disabled', true);
$('#btn_draft').removeClass('button');
$('#btn_draft').addClass('button_submit');
$('#btn_draft').val('正在保存');
edit_form.content.value=content;
var data = {
	'title':edit_form.title.value,
	'content':edit_form.content.value,
	'post_time':edit_form.post_time.value,
	'post_id':_post_id,
	'draft_id':draft_id
};
var url="/7234306/posts/draft";
$.post(url, data, function(ret){
        $('#btn_draft').val('保存成功');
	setTimeout(function(){$('#btn_draft').val('保存草稿');},1000);
	$('#btn_draft').attr('disabled', false);
	$('#btn_draft').removeClass('button_submit');
	$('#btn_draft').addClass('button');
	if (ret.success) {
		var time=(new Date()).toTimeString().replace(/:[^:]+$/, '');
		$('span.draftSave').text(time+'保存到草稿');
		if (ret.success.id) {
			draft_id=ret.success.id;
		}
	}
	draft.lock=false;
}, 'json');
}
$('#btn_draft').click(draft);
setInterval(draft, 60000*5);
$(document).unload(function(){
});
$('#newCate').click(function(){
	Picobox.showDOMBox('创建分类','#addNewCat',{width:330,height:120});
	return false;
});
</script>
		<script type="text/javascript" src="other/.com/msg_count"></script>
	<script type="text/javascript">
	$('body').click(function(e){
	if(!$(e.target).hasClass('pub_subLink') && !$(e.target).parents().hasClass('pub_dropmenu')){
	$('.pub_dropmenu').slideUp('fast');
	}
	})
	</script>
	<!--main end--><!--
	<footer class="footer">
  			<div class="copyright">&copy; 2002 - 2017 BlogBus.com, All Rights Reserved. 博客大巴 版权所有
  			  	<a href="javascript:void(0)" onclick="Picobox.showIFrameBox('反馈意见','http://home.blogbus.com/feedback?url=http%3A%2F%2Fblog.home.blogbus.com%2Fposts%2Fform',{width:400,height:200});">反馈意见</a>
  			</div>
	</footer>
	-->
	<div id="footer" class="footer">
<div class="utilityMenu">
	<a target="_blank" href="http://news.blogbus.com/">媒体报道</a>&nbsp;|&nbsp;
	<a target="_blank" href="http://www.blogbus.com/about/about.html">关于我们</a>&nbsp;|&nbsp;
	<a target="_blank" href="http://www.blogbus.com/about/jobs/jobs.html">工作机会</a>&nbsp;|
	&nbsp;<a target="_blank" href="http://www.blogbus.com/about/blogserviceterm.html">相关法律</a>&nbsp;|
	&nbsp;<a target="_blank" href="http://www.blogbus.com/about/adservice.html">广告服务</a>&nbsp;|
	&nbsp;<a target="_blank" href="http://passport.blogbus.com/register_form">申请博客</a>&nbsp;|&nbsp;
	<a target="_blank" href="http://www.blogbus.com/about/sitemap.html">网站地图</a>&nbsp;|&nbsp;<a target="_blank" href="http://www.blogbus.com/about/partners.html">合作伙伴</a>
</div>
<div class="copyright">&copy; 2002-2017 BlogBus.com, All Rights Reserved. 博客大巴  版权所有  沪ICP B2-20080056号 <a href="javascript:void(0)" onclick="Picobox.showIFrameBox('反馈意见','http://home.blogbus.com/feedback?url=http%3A%2F%2Fblog.home.blogbus.com%2Fposts%2Fform',{width:400,height:200});">反馈意见</a></div>
</div>
<div class="ajaxInfo msg_success" style="display:none;" id="flashMessage">
        <div class="message"></div>
</div>
<script type="text/javascript">
function showFlashMessage(message) {
    el = $('#flashMessage .message');
    el.html(message);
    $('#flashMessage').fadeIn();
    setTimeout(function(){$('#flashMessage').fadeOut('fast')}, 3000);
}
</script>
	
	<!--帮助-->
	<div class="pie page-help">
  				<div class="pie help-inner">
   	 			<ul><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/4514393.html">在日志中插入图片</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/15691548.html">在日志中插入书籍</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/4514399.html">在日志中插入音/视频</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/4514415.html">缤纷表情任您选</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/12378972.html">滤除讨厌的格式</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/4514402.html">私密日志，贴心保护</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/14751582.html">置顶重要日志</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/16064115.html">发布时机，由您设置</a></li><li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/5452576.html">何谓“受欢迎”的标签</a></li></ul>
	  			</div>
				</div>
<div style="display:none;">
</div>
	<div style='display:none'>
		<script type="text/javascript">
				var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
		document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F8452dbf205b0f6608661b0fdea22c741' type='text/javascript'%3E%3C/script%3E"));
				var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
		document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F66e39c4b330e47cc1e523676f29c6402' type='text/javascript'%3E%3C/script%3E"));
				
		</script>
	</div>
	</body>
	</html>

